Field of the Invention
The various embodiments of the invention described herein relate generally to the field of computer cache management. In particular, the disclosure relates to processor architecture and method to provide cache partitioning and cache performance monitoring.
Description of the Related Art
A processor cache (cache) is a hardware cache used by a processing unit (e.g., a core) to reduce the average cost (e.g., time and/or energy) for accessing data from the main memory. A cache is a smaller, faster memory that is closer to the processing unit and is used for temporarily storing copies of the data from frequently accessed locations in the main memory. Cache performance is critical to the overall performance of the processing unit and thus there is a huge incentive in ensuring that the cache is optimally configured and managed to fit the workload at hand. Cache configuration such as cache prefetch settings and cache replacement algorithms directly affect the data that is available in the cache for use by the processing unit. Cache prefetching is a technique that copies data from the main memory into the cache before the data is needed, based on a predicted memory access pattern. Cache replacement algorithms are used to determine what data should be purge from the cache because they are least likely to be used again.